<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>单色影集</title>
    <link rel="stylesheet" href="/css/mobile/index.css">
    <!-- 重置默认样式 -->
    <link rel="stylesheet" href="/css/resetcss.css">

    <style>
               
        
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar">
        <div class="navbar-container">
            <div class="nav-item active">
                <a href="#" class="nav-home">
                    <i class="fas fa-home"></i>
                    <span>主页</span>
                </a>
            </div>
            <div class="nav-item">
                <a href="#" class="nav-life">
                    <i class="fas fa-camera"></i>
                    <span>生活瞬间</span>
                </a>
            </div>
            <div class="nav-item">
                <a href="#" class="nav-tour">
                    <i class="fas fa-plane"></i>
                    <span>旅行记录</span>
                </a>
            </div>
            <div class="nav-item">
                <a href="#" class="nav-atlas">
                    <i class="fas fa-images"></i>
                    <span>精彩图集</span>
                </a>
            </div>
            <div class="nav-item">
                <a href="#" class="nav-center">
                    <i class="fas fa-user"></i>
                    <span>个人中心</span>
                </a>
            </div>
        </div>
    </nav>

    <!-- 未来搜索框 -->
    <div class="search">
        
    </div>
    
    <!-- 内容区域 -->
    <div class="content">
        <div class="photo-grid">
            <!-- 图片项 1 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=1" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">周末野餐时光</div>
                    <div class="photo-date">2023-05-15</div>
                </div>
            </div>
            
            <!-- 图片项 2 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=2" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">城市日落美景</div>
                    <div class="photo-date">2023-05-14</div>
                </div>
            </div>
            
            <!-- 图片项 3 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=3" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">海边度假</div>
                    <div class="photo-date">2023-05-10</div>
                </div>
            </div>
            
            <!-- 图片项 4 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=4" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">家庭聚会</div>
                    <div class="photo-date">2023-05-08</div>
                </div>
            </div>
            
            <!-- 图片项 5 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=5" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">登山远足</div>
                    <div class="photo-date">2023-05-05</div>
                </div>
            </div>
            
            <!-- 图片项 6 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=6" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">美食探索</div>
                    <div class="photo-date">2023-05-03</div>
                </div>
            </div>
            
            <!-- 图片项 7 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=7" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">艺术展览</div>
                    <div class="photo-date">2023-04-28</div>
                </div>
            </div>
            
            <!-- 图片项 8 -->
            <div class="photo-item">
                <div class="photo-img">
                    <img src="https://picsum.photos/500/500?random=8" alt="生活瞬间">
                </div>
                <div class="photo-info">
                    <div class="photo-title">公园散步</div>
                    <div class="photo-date">2023-04-25</div>
                </div>
            </div>
        </div>
        
        <button class="load-more">加载更多</button>
    </div>
</body>


<script src="https://cdn.jsdelivr.net/npm/axios@1.1.2/dist/axios.min.js"></script>
<script src="/configfile/config.js"></script>
<script type="module">

	//window.__ENV__   这样来读取env环境变量里面公开出来的变量

	//获取导航的a标签，并设置href
	const navhome = document.querySelector('.nav-home'); // 返回第一个匹配的节点
	const navlife = document.querySelector('.nav-life'); // 返回第一个匹配的节点
	const navatlas = document.querySelector('.nav-atlas'); // 返回第一个匹配的节点
	const navcenter = document.querySelector('.nav-center');//获取个人中心DOM


	let server_ip = window.__ENV__.SERVER_IP;//服务器ip
	let home_ip = window.__ENV__.HOME_SERVER_IP;//首页ip
	navhome.href = home_ip;
	let life_ip = window.__ENV__.LIFEMOMENT_SERVER_IP;//生活瞬间
	navlife.href = life_ip;
	let atlas_ip = window.__ENV__.ATLAS_SERVER_IP;//图片集
	navatlas.href = atlas_ip;
	let user_ip = window.__ENV__.USER_SERVER_IP;//用户
    navcenter.href = user_ip;
    
	//获取令牌
	let token = localStorage.getItem("token");

    // 简单的导航栏交互效果
    document.querySelectorAll('.nav-item').forEach(item => {
        item.addEventListener('click', function() {
            document.querySelector('.nav-item.active').classList.remove('active');
            this.classList.add('active');
        });
    });
    
    // 模拟加载更多功能
    document.querySelector('.load-more').addEventListener('click', function() {
        this.textContent = '加载中...';
        setTimeout(() => {
            // 这里可以添加加载更多图片的逻辑
            this.textContent = '加载更多';
            alert('已加载更多内容');
        }, 1000);
    });
</script>
</html>